<template>
<el-dialog class="check-dialog" :append-to-body="true" :close-on-click-modal="false" title="用户信息" :visible.sync="checkForm.show">
    <img class="avatar" :src="require(`@/assets/img/${checkForm.form.avatar}`)" alt="">
    <el-form>
        <el-form-item label="账户：">{{checkForm.form.username}}</el-form-item>
        <el-form-item label="真实姓名：">{{checkForm.form.realname}}</el-form-item>
        <el-form-item label="角色：">{{checkForm.form.roleName}}</el-form-item>
        <el-form-item label="性别：">{{checkForm.form.ssex==='0'?'男':checkForm.form.ssex==='1'?'女':'保密'}}</el-form-item>
        <el-form-item label="电话：">{{checkForm.form.mobile || '暂无电话信息'}}</el-form-item>
        <el-form-item label="邮箱：">{{checkForm.form.email || '暂无邮箱信息'}}</el-form-item>
    </el-form>
    <el-form>
        <el-form-item label="部门：">{{checkForm.form.deptName || '暂无部门信息'}}</el-form-item>
        <el-form-item label="状态：">{{checkForm.form.status==='0'?'锁定':'有效'}}</el-form-item>
        <el-form-item label="创建时间：">{{checkForm.form.createTime}}</el-form-item>
        <el-form-item label="最近登录：">{{checkForm.form.lastLoginTime}}</el-form-item>
    </el-form>
</el-dialog>
</template>
<script>
export default {
    name: 'CheckDialog',
    props: {
        checkForm: {
            type: Object,
            required: true
        }
    }
}
</script>

<style lang="less">
.check-dialog {
    .el-dialog__body {
        display: flex;
    }
    .avatar {
        border-radius: 2px;
        width: 130px;
        height: 130px;
        border: none;
        margin-right: 20px;
    }
    .el-form {
        width: 40%;
    }
}
</style>
